/*
 * Copyright (c) 2009 Project E7
 *
 * This file is part of ZebBowling
 *
 * ZebBowling is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * ZebBowling is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with ZebBowling. If not, see <http://www.gnu.org/licenses/>.
 **/

package org.zebbowling.world;

import javax.swing.JFrame;
import javax.swing.WindowConstants;

/**
 *
 * @author Mark
 */
public class BowlingFrame extends JFrame{
    //Window size constants
    public static final int GAME_HEIGHT = 800;
    public static final int GAME_WIDTH = 300;
    public static final int MENU_HEIGHT = 400;
    public static final int MENU_WIDTH = 450;
    //Refresh timer constant in ms
    public static final int GAME_INTERVAL = 50;
    public static final int MENU_INTERVAL = 300;
    //Game
    private BowlingLane alley;

    /**
     * Makes a new Bowling Frame
     * Calls JFrame Constructor
     * @param windowName - Name of the window
     */
    public BowlingFrame(String windowName)
        {
        super(windowName);
        setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
        setSize(MENU_WIDTH, MENU_HEIGHT);
        setResizable(false);
        alley = new SpotBowlingLane(this);
        addKeyListener(alley);
        getContentPane().add(alley);
        setVisible(true);
        }

    public BowlingLane getAlley() {
        return alley;
        }

}
